import { axios } from '@/utils/request'

const api = {
  dvDictType: 'qiyu/dict/type'
}

export function getDvDictTypeList (parameter) {
  return axios({
    url: api.dvDictType + '/list',
    method: 'get',
    params: parameter
  })
}

export function saveDvDictType (parameter) {
  return axios({
    url: api.dvDictType + (parameter.id > 0 ? '/update' : '/save'),
    method: 'post',
    data: parameter,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

export function delDvDictType (parameter) {
  return axios({
    url: api.dvDictType + '/remove',
    method: 'post',
    params: parameter
  })
}

export const dvDictTypeExport = api.dvDictType + '/export'
